package com.sky.controller.user;/*
 * @author Fairy
 * @date 2025/11/22
 * @description DishController类的详细描述
 */

import com.sky.constant.StatusConstant;
import com.sky.entity.Dish;
import com.sky.result.Result;
import com.sky.service.DishService;
import com.sky.vo.DishVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController("userDishController")
@RequestMapping("/user/dish")
public class DishController {

    @Autowired
    private DishService dishService;


    /**
     * 根据分类id获取菜品口味列表
     * @param categoryId
     * @return
     */
/*     @GetMapping("/list")
    @ApiOperation("根据分类id获取菜品口味列表")
    public Result<List<DishVO>> list(long categoryId){
        Dish dish = new Dish();
        dish.setCategoryId(categoryId);
        dish.setStatus(StatusConstant.ENABLE);// 查询起售的菜品
        List<DishVO> list = dishService.listWithFlavor(dish);
        return Result.success(list);
    } */


}
